package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.RoleJurisdictionMapper;
import com.example.shoppingmall.pojo.RoleJurisdiction;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleJurisdictionService {
    @Autowired
    private RoleJurisdictionMapper roleJurisdictionMapper;

    public List<RoleJurisdiction> RoleJurisdictionById(@Param("id")int id){
        return roleJurisdictionMapper.RoleJurisdictionById(id);
    }

    public int delete(@Param("id")int id){
        return roleJurisdictionMapper.delete(id);
    }

    public int chackModule(@Param("roleId")int roleId,@Param("moduleId")int moduleId){
        return roleJurisdictionMapper.chackModule(roleId,moduleId);
    }

    public int add(@Param("roleId")int roleId,@Param("moduleId")int moduleId){
        return roleJurisdictionMapper.add(roleId,moduleId);
    }

}
